package com.ck.web.shiro;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.apache.shiro.authc.AuthenticationException;

/**
 * 登录异常类
 * Created by ChengK on 2017/4/24 0024.
 */
@Setter
@Getter
@ToString
public class LoginException extends AuthenticationException {
    private static final long serialVersionUID = -4571861871038175705L;

    private String errorCode;

    public LoginException() {
        super();
    }

    /**
     * @param errorCode 登入错误码
     * @param message   登入错误消息
     */
    public LoginException(String errorCode, String message){
        super(message);
        this.errorCode = errorCode;
    }

    /**
     * @param errorCode 登入错误码
     * @param message   登入错误消息
     * @param cause     内部错误
     */
    public LoginException(String errorCode, String message ,Throwable cause){
        super(errorCode,cause);
        this.errorCode = errorCode;
    }
}
